package com.jt.aop;

import com.jt.vo.SysResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class SystemException {
    @ExceptionHandler(RuntimeException.class)
    public Object exception( Exception e){
        e.printStackTrace();
        //如果出错了返回系统级别的报错数据即可
        return SysResult.fail();
    }
}
